package com.school_list.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Administrator
 * @description TODO
 * @date 2023/10/26 9:23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {

    private Integer code;
    private String msg;
    private Object date;


    public static Result success(){
        return new Result(1,"success",null);
    }

    public static Result success(Object date){
        return new Result(1,"success",date);
    }

    public static Result error(String msg){
        return new Result(0,msg,null);
    }
}
